package com.tongji.seller.model
{
	
	import com.tongji.seller.view.twoD.Furniture;
	import com.tongji.seller.vo.FurnitureSaved;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.Sprite;
	import flash.filters.DropShadowFilter;
	
	import mx.collections.ArrayCollection;
	
	import org.robotlegs.mvcs.Actor;
	
	/**
	 * 存放拖拽进场景中的家具
	 * @author caddy
	 * 
	 */
	[Bindable]
	public class FurnitureModel extends Actor
	{
		public var furniture:Furniture;
		public var vroom:Furniture;
		public var furArray:ArrayCollection= new ArrayCollection();
		
		/*---- 保存阴影的临时变量------*/
		public var currentDistance:Number = 40;
		public var currentAlpha:Number = 0.4;
		public var currentAngle:Number = 45;
		public var currentBlurX:Number = 4;		
		public var currentBlurY:Number = 4;		
		public var currentStrength:Number = 1;		
		public var currentQuality:Number = 1;		
		public var currentColor:uint = 0xff0000;
		
		public var furniturCount:int = 0;//家具数量
		
		public var selectedFur:Furniture;
		
		public var product:Object;
		public var imgArray:ArrayCollection;
		
		public var fursaveds:Array =new Array();
		
		public function FurnitureModel()
		{
			super();
		}
		
		public function getRoom(room:Furniture):void
		{
			this.vroom = room;
		}
		
		public function deleteSelectedObj():void
		{
			selectedFur.parent.removeChild(selectedFur);
		}
		
		public function resetImges(product:Object):void
		{
			imgArray = new ArrayCollection();
			if (product.ItemImgList.imgOne != null)
				imgArray.addItem(product.ItemImgList.imgOne);
			
			if (product.ItemImgList.imgTwo != null)
				imgArray.addItem(product.ItemImgList.imgTwo);
			
			if (product.ItemImgList.imgThree != null)
				imgArray.addItem(product.ItemImgList.imgThree);	
		}
	}
}